package ipebg.mzk.common.util;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by H2012101 on 2015/11/25.
 */
public class ExcelColumn {
    private int firstRow;
    private int lastRow;
    private int firstCol;
    private int lastCol;
    private String key;
    private String label;
    private boolean merge;
    private boolean group;
    private List<ExcelColumn> children = new ArrayList<ExcelColumn>();

    public ExcelColumn() {
        this("", 0, 0, 0, 0);
    }

    public ExcelColumn(String label) {
        this(label, 0, 0, 0, 0,false);
    }

    public ExcelColumn(String label,boolean group) {
        this(label, 0, 0, 0, 0,group);
    }

    public ExcelColumn(String label,int firstRow, int lastRow, int firstCol, int lastCol) {
        this(label, firstRow, lastRow, firstCol, lastCol, false);
    }

    public ExcelColumn(String label,int firstRow, int lastRow, int firstCol, int lastCol,boolean group) {
        this.label = label;
        this.firstRow = firstRow;
        this.lastRow = lastRow;
        this.firstCol = firstCol;
        this.lastCol = lastCol;
        this.group = group;
    }

    public void addChild(ExcelColumn excelColumn) {
        children.add(excelColumn);
    }

    public List<ExcelColumn> getChildren() {
        return children;
    }

    public void setChildren(List<ExcelColumn> children) {
        this.children = children;
    }

    public boolean isGroup() {
        return group;
    }

    public void setGroup(boolean group) {
        this.group = group;
    }

    public boolean isMerge() {
        return merge;
    }

    public void setMerge(boolean merge) {
        this.merge = merge;
    }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public String getLabel() {
        return label;
    }

    public void setLabel(String label) {
        this.label = label;
    }

    public int getFirstRow() {
        return firstRow;
    }

    public void setFirstRow(int firstRow) {
        this.firstRow = firstRow;
    }

    public int getLastRow() {
        return lastRow;
    }

    public void setLastRow(int lastRow) {
        this.lastRow = lastRow;
    }

    public int getFirstCol() {
        return firstCol;
    }

    public void setFirstCol(int firstCol) {
        this.firstCol = firstCol;
    }

    public int getLastCol() {
        return lastCol;
    }

    public void setLastCol(int lastCol) {
        this.lastCol = lastCol;
    }
}
